package org.example.campsys.service;

import org.example.campsys.mapper.AdminMapper;
import org.example.campsys.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminService {
        @Autowired
        private AdminMapper adminMapper;

      public Integer countStudent(Integer status){
            return adminMapper.countStudent(status);
      }
      public Integer countCourse(Integer status){
              return adminMapper.countCourse(status);
      }
      public Integer countActivity(Integer status){
              return adminMapper.countActivitiy(status);
      }
      public Integer addActivity(ActivityInfo activityInfo){
            return adminMapper.addActivity(activityInfo);
      }
      public Integer addClass(ClassInfo classInfo){
          return  adminMapper.addClass(classInfo);
      }
      public List<ActivityInfo> selectActivity(ActivityInfo activityInfo){
          return adminMapper.selectActivity(activityInfo);
      }
      public Integer deleteActivity(Integer id){
          return adminMapper.deleteActivity(id);
      }
      public Integer updateActivity(ActivityInfo activityInfo){
          return adminMapper.updateActivity(activityInfo);
      }
      public Integer orcActivity(ActivityInfo activityInfo){
          return adminMapper.orcActivity(activityInfo);
      }
      public List<ClassInfo> selectClass(){
          return adminMapper.selectClass();
      }
      public Integer cfgClass(Integer activityId,Integer id){
          return adminMapper.cfgActivity(activityId,id);
      }
      public Integer cfgTeacher(Integer teacherId, Integer id){
          return adminMapper.cfgTeacher(teacherId,id);
      }
      public Integer updClass(ClassInfo classInfo){
          return  adminMapper.updClass(classInfo);
      }
      public Integer deleteClass(Integer id){
          return  adminMapper.deleteClass(id);
      }
      public List<StudentInfo> selectStudent(StudentInfo studentInfo){
          return adminMapper.selectStudent(studentInfo);
      }
      public Integer cfgStudent(Integer classId, Integer studentId){
          return adminMapper.cfgStudent(classId,studentId);
      }
      public Integer updStudent(StudentInfo studentInfo){
          return  adminMapper.updateStudent(studentInfo);
      }
      public Integer deleteStudent(Integer id){
          return adminMapper.deleteStudent(id);
      }
      public Integer addStudent(StudentInfo studentInfo){
          return adminMapper.addStudent(studentInfo);
      }
      public Integer auditStudent(StudentInfo studentInfo){
          return adminMapper.auditStudent(studentInfo);
      }
      public Integer addTeacher(TeacherInfo teacherInfo){
          return adminMapper.addTeacher(teacherInfo);
      }
      public Integer updTeacher(TeacherInfo teacherInfo){
          return adminMapper.updTeacher(teacherInfo);
      }
      public List<TeacherInfo> selectTeacher(TeacherInfo teacherInfo){
          return adminMapper.selectTeacher(teacherInfo);
      }
      public Integer delTeacher(Integer id){
          return adminMapper.delTeacher(id);
      }
      public List<StudentInfo> selClassStu (Integer classId) {
          return adminMapper.selClassStu(classId);
    }
}
